
# 生成器函数

def mygen():
    print('1')
    yield 999   # print('...')
    yield 888
    yield 777
    print('2')

r = mygen()
print('r=', r)   # r=????
print('--------------------------------')
for x in r:
    print('x=', x)